package com.example.app.components


import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.size
import androidx.compose.material.Divider
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp

@Composable
fun DividerSample() {
    Column(
        modifier = Modifier
            .background(Color.Red)
            .size(300.dp)
    ,verticalArrangement = Arrangement.Center,
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        Text(text = "wsh3038971")
        // startIndent头部缩进
        // thickness宽度
        Divider(
            startIndent = 20.dp,
            thickness = 20.dp,
            color = Color.Blue
        )
        Text(text = "wsh3038971")
    }
}

@Preview(
    showSystemUi = true
)
@Composable
fun DividerSamplePreview() {
    DividerSample()
}

